package com.chenxingnet.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.chenxingnet.dto.Waybills;
import com.chenxingnet.dto.WaybillsExample;

public interface WaybillsMapper {
	public List<Map> findByProperty(Map params);
	public Long countByProperty(Map params);
    int countByExample(WaybillsExample example);

    int deleteByExample(WaybillsExample example);

    int deleteByPrimaryKey(Integer wid);

    int insert(Waybills record);

    int insertSelective(Waybills record);

    List<Waybills> selectByExample(WaybillsExample example);

    Waybills selectByPrimaryKey(Integer wid);

    int updateByExampleSelective(@Param("record") Waybills record, @Param("example") WaybillsExample example);

    int updateByExample(@Param("record") Waybills record, @Param("example") WaybillsExample example);

    int updateByPrimaryKeySelective(Waybills record);

    int updateByPrimaryKey(Waybills record);
	
	//新增方法
    
	List<Waybills> selectByDeptid(@Param("deptId")Integer deptid,@Param("startPos")int startPos,@Param("pageSize")int pageSize);
    
    List<Waybills> selectAllCount(@Param("startPos")int startPos,@Param("pageSize")int pageSize);
    
    List<Waybills> selectAll();
    
    List<Waybills> getDayShowWay();
    
	List<String> selectAllByChexing();
	//删除时修改数据状态0
	int updateStartById(@Param("wid")Integer wid);
	
	long getCountAll();
	
	long getCount(@Param("deptId")Integer deptid);
	
	int insertSelectiveMy(Waybills record);

	int updateSetSongda(@Param("wayidSingle")String wayidSingle);

	int updateSetFasheng(@Param("parseInt")int parseInt);
	
	List<Waybills> selectBySong(@Param("song") String song);
	
	List<Waybills> selectByDeli();
	
	 List<Waybills> selectByDeptidw(@Param("deptid") Integer deptid);

	List<Waybills> getAllWaybillsMy(@Param("startPos")int startPos, @Param("pageSize")int pageSize);

	List<Waybills> selectAllForSerach(@Param("deptname")String deptname, @Param("chexing")String chexing,@Param("xingming")String xingming,@Param("jiesuan") String jiesuan);

	List<Waybills> selectAllForSerachByPage(@Param("deptname")String deptname, @Param("chexing")String chexing,@Param("xingming")String xingming,@Param("jiesuan") String jiesuan,@Param("startPos") int startPos, @Param("pageSize")int pageSize);

	 Waybills selectByidAndSou(@Param("wid")Integer wid,@Param("souacc")String souacc);
	 
	 int updateByShiSongda(@Param("wayidSingle")String wayidSingle);

	List<Waybills> selectByExamplehByPage(WaybillsExample querWay,@Param("startPos")int startPos, @Param("pageSize")int pageSize);

	//查询已送达数量
	long getCountByS(@Param("deptId")Integer deptid);
	//查询超时数量
	long getCountByCHS(@Param("deptId")Integer deptid);
	//查询事故数量
	long getCountbYSG(@Param("deptId")Integer deptid);

	int updateChangshangjiesuanshi(@Param("parseInt")int parseInt);
	//按照车架号和部门id搜索
	List<Waybills> showByVin(@Param("souVin") String souVin,@Param("deptId") Integer deptid);
	
	Waybills showRemById(@Param("wid") Integer wid);
	
	//修改会计页面搜索方法
	List<Waybills> selectList(@Param("record") Waybills waybills);
	
}